home *** CD-ROM | disk | FTP | other *** search
- unit Tredit;
- interface
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Menus, Dialogs, StdCtrls;
-
- type
- TRightEdit = class(TCustomMemo)
- private
- { Private declarations }
- protected
- { Protected declarations }
- public
- { Public declarations }
- constructor Create(AOwner: TComponent); override;
- procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
- published
- { Published declarations }
- { property AutoSelect; }
- { property AutoSize; }
- property BorderStyle;
- property CharCase;
- property Color;
- property Ctl3D;
- property Cursor;
- property DragCursor;
- property DragMode;
- property Enabled;
- property Font;
- property Height;
- property HelpContext;
- property HideSelection;
- property Hint;
- property Left;
- property MaxLength;
- property Name;
- property OEMConvert;
- property ParentColor;
- property ParentCtl3D;
- property ParentFont;
- property ParentShowHint;
- { property PasswordChar; }
- property PopupMenu;
- property ReadOnly;
- property ShowHint;
- property TabOrder;
- property Tag;
- property Text;
- property Top;
- property Visible;
- property Width;
- end;
-
- procedure Register;
-
- implementation
-
- constructor TRightEdit.Create(AOwner: TComponent);
- begin
- inherited Create(AOwner);
- Align := alNone;
- Alignment := taRightJustify;
- ScrollBars := ssNone;
- WantReturns := False;
- WantTabs := False;
- WordWrap := False;
- end;
-
- procedure TRightEdit.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
- begin
- if AHeight > (2 * abs(Font.Height)) then AHeight := 2 * abs(Font.Height);
- inherited SetBounds(ALeft, ATop, AWidth, AHeight);
- end;
-
- procedure Register;
- begin
- RegisterComponents('Dr.Bob', [TRightEdit]);
- end;
-
- end.
-